package as.entity;

import java.util.HashSet;
import java.util.Set;

/**
 * Student entity. @author MyEclipse Persistence Tools
 */

public class Student implements java.io.Serializable {

	// Fields

	private Long studentId;
    private String name;
	private String major;
	private String class_;
	private Boolean sex;
	private Set registers = new HashSet(0);
	private Boolean in;

	// Constructors

	/** default constructor */
	public Student() {
	}

	/** minimal constructor */
	public Student(Long studentId) {
		this.studentId = studentId;
	}

	/** full constructor */
	public Student(Long studentId, String name, String major, String class_,
			Boolean sex, Set registers) {
		this.studentId = studentId;
		this.name = name;
		this.major = major;
		this.class_ = class_;
		this.sex = sex;
		this.registers = registers;
	}

	// Property accessors

	public Long getStudentId() {
		return this.studentId;
	}

	public void setStudentId(Long studentId) {
		this.studentId = studentId;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getMajor() {
		return this.major;
	}

	public void setMajor(String major) {
		this.major = major;
	}

	public String getClass_() {
		return this.class_;
	}

	public void setClass_(String class_) {
		this.class_ = class_;
	}

	public Boolean getSex() {
		return this.sex;
	}

	public void setSex(Boolean sex) {
		this.sex = sex;
	}

	public Set getRegisters() {
		return this.registers;
	}

	public void setRegisters(Set registers) {
		this.registers = registers;
	}
	public Boolean getIn() {
		return in;
	}

	public void setIn(Boolean in) {
		this.in = in;
	}

	@Override
	public boolean equals(Object obj) {
		
		return this.getStudentId().longValue()==((Student)obj).getStudentId().longValue();
	}

	

}